package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 款号工序关联表单对象
 *
 * @author youlaitech
 * @since 2025-10-06 11:07
 */
@Getter
@Setter
@Schema(description = "款号工序关联表单对象")
public class StyleProcessForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "款号")
    private Long styleId;

    @Schema(description = "工序ID")
    @NotNull(message = "工序ID不能为空")
    private Long processId;

    @Schema(description = "款号特定单价（如为空则使用工序默认单价）")
    private BigDecimal customPrice;

    @Schema(description = "款号特定标准工时")
    private BigDecimal customTime;

    @Schema(description = "在该款号中的工序顺序")
    private Integer processOrder;

    @Schema(description = "所需工人数量")
    private Integer requiredWorkers;

    @Schema(description = "创建人")
    @Size(max=50, message="创建人长度不能超过50个字符")
    private String createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @Size(max=50, message="更新人长度不能超过50个字符")
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "工序名称")
    @Size(max=50, message="工序名称")
    private String processName;
}
